import {Component, OnInit} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {AppUrl} from '../../../app.url';

@Component({
    selector: 'app-manager-confirm',
    templateUrl: './manager-confirm.component.html',
    styleUrls: ['./manager-confirm.less']
})

export class ManagerConfirmComponent implements OnInit {
    actList = [];
    actName;
    actId: any;
    private activities = [];

    inputValueOne: string;
    inputValueTwo: string;
    autosize = {
        minRows: 2,
        maxRows: 6
    };

    constructor(private http: HttpClient) {
    }

    updateConfirm(act, status) {
        act.actConfirm = status;
        this.http.post(AppUrl.activity.urlUpdate, {actId: act.actId, actConfirm: act.actConfirm}).subscribe(data => {
            console.log(data);
        });
    }

    ngOnInit() {
        this.http.post(AppUrl.activity.urlSelect, {}).subscribe(data => {
            let temp: any = data;
            this.activities = temp.data;
        });
    }




}
